import * as mars3d from "mars3d"

const Cesium = mars3d.Cesium;

// 发光效果的集合体
export function createGraphicEffect(centerPosLonLat:mars3d.LngLatPoint,radius:number,color:any) {
    const graphic = new mars3d.graphic.EllipsoidPrimitive({
      position: centerPosLonLat,
      style: {
        radii: new Cesium.Cartesian3(radius, radius, radius),
        maximumConeDegree: 90,
        materialType: mars3d.MaterialType.EllipsoidWave,
        materialOptions: {
          color: color,
          speed: 10.0
        },
        // attr:{},
      }
    })
    return graphic;
}

export function createGraphicLine(centerPosLonLat:mars3d.LngLatPoint,radius:number) {
  const graphic = new mars3d.graphic.EllipsoidPrimitive({
    position: centerPosLonLat,
    style: {
      radii: new Cesium.Cartesian3(radius, radius, radius),
      maximumConeDegree: 90,
      color: Cesium.Color.RED.withAlpha(0.5),
      outline: true,
      outlineColor: "rgba(255,255,255,0.5)"
    },
    // attr: { remark: "示例2" }
  });
  return graphic;
}